package br.com.occurencesafe.view.ConfigSQL;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JButton;

import br.com.occurencesafe.view.Principal;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class Options extends JFrame {

	private static final long serialVersionUID = 2L;
	private JPanel contentPane;

	public Options() {
		setTitle("Occurence Safe - Options");
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		Dimension tela = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension tela1 = getSize();
		setLocation((tela.width - tela1.width)/2, (tela.height-tela1.height)/2);
		
		JLabel label = new JLabel("Occurence Safe");
		label.setFont(new Font("Trebuchet MS", Font.BOLD | Font.ITALIC, 27));
		label.setBounds(10, 11, 194, 32);
		contentPane.add(label);
		
		JButton btnPopular = new JButton("Popular");
		btnPopular.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Principal Tela1 = new Principal();
				Tela1.setVisible(true);
				dispose();
			}
		});
		btnPopular.setBounds(91, 124, 89, 23);
		contentPane.add(btnPopular);
		
		JButton btnVazio = new JButton("Vazio");
		btnVazio.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Principal Tela1 = new Principal();
				Tela1.setVisible(true);
				dispose();
			}
		});
		btnVazio.setBounds(235, 124, 89, 23);
		contentPane.add(btnVazio);
	}
}
